//
//  ViewController.m
//  简单的侧栏
//
//  Created by 小果 on 16/3/6.
//  Copyright © 2016年 小果. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIView *containerView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
}

- (IBAction)pan:(UIPanGestureRecognizer *)sender {
    
    CGPoint p = [sender translationInView:self.view];
    
    self.containerView.transform = CGAffineTransformTranslate(self.containerView.transform, p.x, 0);
    
    [sender setTranslation:CGPointZero inView:self.view];
    
}


@end
